<?php
/*
 +----------------------------------------------------------------------
 + Title        : Address 控制器
 + Author       : Randy_chen
 + Version      : V1.0.0.1
 + Initial-Time : 2019/10/16 14:30
 + Last-time    : 2019/10/16 14:30+ chen2
 + Desc         : Address
 +----------------------------------------------------------------------
*/


namespace app\common\validate;


use think\Validate;

class Address extends Validate
{
    protected $rule = [
        'mid|用户'         => 'require|number',
        'address|地址'      => 'require',
        'address_name|地址'      => 'require',
        'area|详细地址'      => 'require',
        'is_default|是否默认'      => 'require',
        'latitude|维度'      => 'require',
        'longitude|经度'      => 'require',
        'name|收货人姓名'      => 'require',
        'phone|收货人手机号'      => 'require|mobile',
    ];

    protected $scene = [
       'add' =>['mid','address' , 'address_name' , 'area' ,'is_default' ,'latitude' ,'longitude' ,'name' , 'phone'],
       'edit' =>[],
    ];
}